﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FrmDetalleCronograma.aspx.cs" Inherits="Apa.Forms.FrmDetalleCronograma" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    
    <link rel="stylesheet" type="text/css" href="jquery.ganttView-master/lib/jquery-ui-1.8.4.css" />
	<%--<link rel="stylesheet" type="text/css" href="jquery.ganttView-master/diagrama/reset.css" />--%>
	<link rel="stylesheet" type="text/css" href="jquery.ganttView-master/jquery.ganttView.css" />


	<style type="text/css">
		body {
			font-family: tahoma, verdana, helvetica;
			font-size: 0.8em;
			padding: 10px;
		}
	</style>

    <style>
    /* #### bootstrap Form #### */
.bootstrap-frm {
    margin-left:auto;
    margin-right:auto;

    max-width: 100%;
    background: #FFF;
    padding: 20px 30px 20px 30px;
    font: 12px "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #888;
    text-shadow: 1px 1px 1px #FFF;
    border:1px solid #DDD;
    border-radius: 5px;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
}
.bootstrap-frm h1 {
    font: 25px "Helvetica Neue", Helvetica, Arial, sans-serif;
    padding: 0px 0px 10px 40px;
    display: block;
    border-bottom: 1px solid #DADADA;
    margin: -10px -30px 30px -30px;
    color: #888;
}
.bootstrap-frm h1>span {
    display: block;
    font-size: 11px;
}
.bootstrap-frm .label {
    display: block;
    margin: 0px 0px 5px;
}
.bootstrap-frm label>span {
    float: left;
    width: 20%;
    text-align: right;
    padding-right: 10px;
    margin-top: 10px;
    color: #333;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: bold;
}
.bootstrap-frm input[type="text"],input[type="email"],input[type="number"],input[type="password"],input[type="date"], .bootstrap-frm input[type="email"], .bootstrap-frm textarea, .bootstrap-frm select{
    border: 1px solid #CCC;
    color: #888;
    height: 20px;
    line-height:15px;
    margin-bottom: 16px;
    margin-right: 6px;
    margin-top: 2px;
    outline: 0 none;
    padding: 5px 0px 5px 5px;
    width: 70%;
    border-radius: 4px;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;    
    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
    -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}



.bootstrap-frm select {
    background: #FFF url('down-arrow.png') no-repeat right;
    background: #FFF url('down-arrow.png') no-repeat right;
    appearance:none;
    -webkit-appearance:none; 
    -moz-appearance: none;
    text-indent: 0.01px;
    text-overflow: '';
    width: 70%;
    height: 35px;
    line-height:15px;
}
.bootstrap-frm textarea{
    height:100px;
    padding: 5px 0px 0px 5px;
    width: 70%;
}
.bootstrap-frm .button {
    background: #FFF;
    border: 1px solid #CCC;
    padding: 10px 25px 10px 25px;
    color: #333;
    border-radius: 4px;
}
.bootstrap-frm .button:hover {
    color: #333;
    background-color: #EBEBEB;
    border-color: #ADADAD;
}
    
    </style>

    <style type="text/css">
.Initial
{
  display: block;
  padding: 4px 18px 4px 18px;
  float: left;
  background: url("../Images/InitialImage.png") no-repeat right top;
  color: Black;
  font-weight: bold;
}
.Initial:hover
{
  color: White;
  background: url("../Images/SelectedButton.png") no-repeat right top;
}
.Clicked
{
  float: left;
  display: block;
  background: url("../Images/SelectedButton.png") no-repeat right top;
  padding: 4px 18px 4px 18px;
  color: Black;
  font-weight: bold;
  color: White;
}



</style>

<script>

    function validar() {


        var r = confirm("Esta seguro de eliminar los registros correspondientes a este programa ?");
        if (r == true) {
            return true;
        } else {
            return false;
        }

    }

  

</script>

</head>

<body>
    <form id="form1" runat="server" class="bootstrap-frm">
         <h1> <asp:Literal ID="lbTitulo" runat="server" text=""></asp:Literal>
        <span><asp:Literal ID="lbSubtitulo" runat="server" text=""></asp:Literal></span>
    </h1>
    <div>
       <asp:HiddenField ID="idDetalle" runat="server" Value="0"/>
    <table width="100%" align="center">
      <tr>
        <td>
          <asp:Button Text="AutoEvaluación" BorderStyle="None" ID="Tab3" CssClass="Initial" runat="server"
              OnClick="Tab3_Click" />
          <asp:Button Text="Cronograma" BorderStyle="None" ID="Tab1" CssClass="Initial" runat="server"
              OnClick="Tab1_Click" />
          <asp:Button Text="Diagrama Gantt" BorderStyle="None" ID="Tab2" CssClass="Initial" runat="server"
              OnClick="Tab2_Click" />
          <asp:MultiView ID="MainView" runat="server">
            <asp:View ID="View1" runat="server">
              <table style="width: 100%; border-width: 1px; border-color: #666; border-style: solid">
                <tr>
                  <td>
                     <label class="label">
     
        <span>Actividad :</span>
        <asp:TextBox ID="tbActividad" runat="server" placeholder="Nombre de la actividad"></asp:TextBox>
   
        <span>Fecha Inicio Programada:</span>
        <asp:TextBox ID="tbFechaInicial" runat="server" placeholder="YYYY-MM-DD" Type="date"></asp:TextBox>

        <span>Fecha Fin Programada</span>
        <asp:TextBox ID="tbFechaFinal" runat="server" placeholder="YYYY-MM-DD" Type="date"></asp:TextBox>

        <span>Fecha Inicio Real:</span>
        <asp:TextBox ID="tbFechaInicialReal" runat="server" placeholder="YYYY-MM-DD" Type="date"></asp:TextBox>

        <span>Fecha Fin Real</span>
        <asp:TextBox ID="tbFechaFinalReal" runat="server" placeholder="YYYY-MM-DD" Type="date"></asp:TextBox>

        <span>Peso :</span>
        <asp:TextBox ID="tbPeso" runat="server" placeholder="Peso" ReadOnly="true"></asp:TextBox>
        <asp:CheckBox runat="server" id="chkPeso" AutoPostBack="true" 
                          oncheckedchanged="chkPeso_CheckedChanged"/>
     
        <span>Indicador :</span>
        <asp:TextBox ID="tbIndicador" runat="server" placeholder="Indicador" ReadOnly="true"></asp:TextBox>
        <asp:CheckBox runat="server" OnCheckedChanged="chkIndicador_click" id="chkIndicador" AutoPostBack="true"/>

        <span>Responsable :</span>
        <asp:TextBox ID="tbResponsable" runat="server" placeholder="Responsable" ReadOnly="true"></asp:TextBox>
        <asp:CheckBox runat="server" id="chkResponsable" AutoPostBack="true" 
                          oncheckedchanged="chkResponsable_CheckedChanged"/>

        <span>Cargo :</span>
        <asp:TextBox ID="tbCargo" runat="server" placeholder="Cargo" ReadOnly="true"></asp:TextBox>
        <asp:CheckBox runat="server" id="chkCargo" AutoPostBack="true" 
                          oncheckedchanged="chkCargo_CheckedChanged"/>

        <span>Meta :</span>
        <asp:TextBox ID="tbMeta" runat="server" placeholder="Meta" ReadOnly="true"></asp:TextBox>
        <asp:CheckBox runat="server" id="chkMeta" AutoPostBack="true" 
                          oncheckedchanged="chkMeta_CheckedChanged"/>

        <span>Descripción :</span>
        <asp:TextBox ID="tbDescripcion" runat="server" placeholder="Descripcion" ReadOnly="true"></asp:TextBox>
        <asp:CheckBox runat="server" id="chkDescripcion" AutoPostBack="true" 
                          oncheckedchanged="chkDescripcion_CheckedChanged"/>

        <span>Recursos :</span>
        <asp:TextBox ID="tbRecursos" runat="server" placeholder="Recursos" ReadOnly="true"></asp:TextBox>
        <asp:CheckBox runat="server" id="chkRecursos" AutoPostBack="true" 
                          oncheckedchanged="chkRecursos_CheckedChanged"/>

        <span>Otro :</span>
        <asp:TextBox ID="tbOtro" runat="server" placeholder="Otro" ReadOnly="true"></asp:TextBox>
        <asp:CheckBox runat="server" id="chkOtro" AutoPostBack="true" 
                          oncheckedchanged="chkOtro_CheckedChanged"/>
         &nbsp;<br />
     <br />
        
        <br />&nbsp;&nbsp;&nbsp;&nbsp;

         <asp:Button ID="btGuardar" runat="server" Text="Guardar" class="button" 
                          onclick="btGuardar_Click" />
  
       <br />
       <br />
       <label>
<asp:Label ID="lblmsg" runat="server"></asp:Label>
</label>
        <br />
        <br />
         <br />
         <br />
        <asp:GridView ID="gvCronograma" runat="server" Width="100%" HeaderStyle-Font-Bold="true" DataKeyNames="idDetalle" AutoGenerateColumns="false" 
                          onrowcommand="gvCronograma_RowCommand">
            <Columns>
                <asp:ButtonField Text="Editar" CommandName="Editar" ButtonType="Link"/>
                <asp:TemplateField HeaderText="idDetalle" Visible="false">
                    <ItemTemplate>
                        <asp:Label ID="txtidDetalle" runat="server" Text='<%#Eval("idDetalle") %>'/>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Actividad">
                    <ItemTemplate>
                        <asp:Label ID="txtActividad" runat="server" Text='<%#Eval("Actividad") %>'/>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="FechaInicioProgramada">
                    <ItemTemplate>
                        <asp:Label ID="lblFecha2" runat="server" Text='<%#Eval("fechaInicioPlan") %>'/>
                    </ItemTemplate>
                </asp:TemplateField>

<asp:TemplateField HeaderText="FechaFinProgramada">
<ItemTemplate>
<asp:Label ID="lblFecha" runat="server" Text='<%#Eval("fechaFinPlan") %>'/>
</ItemTemplate>
     </asp:TemplateField>
<asp:TemplateField HeaderText="FechaInicioReal">
<ItemTemplate>
<asp:Label ID="lblFecha3" runat="server" Text='<%#Eval("fechaInicioReal") %>'/>
</ItemTemplate>
     </asp:TemplateField>

<asp:TemplateField HeaderText="FechaFinReal">
<ItemTemplate>
<asp:Label ID="lblFecha4" runat="server" Text='<%#Eval("fechaFinReal") %>'/>
</ItemTemplate>
     </asp:TemplateField>


<asp:TemplateField HeaderText="Peso">
      <ItemTemplate>
         <asp:Label ID="lblPeso" runat="server" Text='<%#Eval("peso") %>'/>
     </ItemTemplate>
</asp:TemplateField>


<asp:TemplateField HeaderText="Indicador">
      <ItemTemplate>
         <asp:Label ID="lblIndicador" runat="server" Text='<%#Eval("indicador") %>'/>
     </ItemTemplate>
</asp:TemplateField>


  

<asp:TemplateField HeaderText="Responsable">
      <ItemTemplate>
         <asp:Label ID="lblResponsable" runat="server" Text='<%#Eval("responsable") %>'/>
     </ItemTemplate>
</asp:TemplateField>




<asp:TemplateField HeaderText="Cargo">
      <ItemTemplate>
        <asp:Label ID="lblCargo" runat="server" Text='<%#Eval("cargo") %>'/>
     </ItemTemplate>
</asp:TemplateField>





<asp:TemplateField HeaderText="Meta">
      <ItemTemplate>
         <asp:Label ID="lblMeta" runat="server" Text='<%#Eval("meta") %>'/>
     </ItemTemplate>
</asp:TemplateField>




<asp:TemplateField HeaderText="Descripcion">
      <ItemTemplate>
         <asp:Label ID="lblDescripcion" runat="server" Text='<%#Eval("descripcion") %>'/>
     </ItemTemplate>
</asp:TemplateField>

  <asp:TemplateField HeaderText="Recursos">
      <ItemTemplate>
         <asp:Label ID="lblRecursos" runat="server" Text='<%#Eval("recursos") %>'/>
     </ItemTemplate>
</asp:TemplateField>


  <asp:TemplateField HeaderText="Otro">
      <ItemTemplate>
         <asp:Label ID="lblOtro" runat="server" Text='<%#Eval("Otro") %>'/>
     </ItemTemplate>
</asp:TemplateField>
            </Columns>
            <HeaderStyle Font-Bold="True" />
       </asp:GridView>
     
     </label>
                  </td>
                </tr>
              </table>
            </asp:View>
            <asp:View ID="View2" runat="server">
              <table style="width: 100%; border-width: 1px; border-color: #666; border-style: solid">
                <tr>
                  <td><br>
                   <label>

 <h1>Diagrama de actividades. <span>Diagrama de gantt que permite visualizar las 
     fechas de las actividades.</span>
    </h1>
</label>
    	<div id="ganttChart"></div>
	<br/><br/>
	<div id="eventMessage"></div>

	<script type="text/javascript" src="jquery.ganttView-master/lib/jquery-1.4.2.js"></script>
	<script type="text/javascript" src="jquery.ganttView-master/lib/date.js"></script>
	<script type="text/javascript" src="jquery.ganttView-master/lib/jquery-ui-1.8.4.js"></script>
	<script type="text/javascript" src="jquery.ganttView-master/jquery.ganttView.js"></script>
	<%--<script type="text/javascript" src="jquery.ganttView-master/diagrama/data.js"></script>--%>
    <script type="text/javascript" src="jquery.ganttView-master/diagrama/jsonResult.aspx"></script>
	<script type="text/javascript">
	    $(function () {
	        $("#ganttChart").ganttView({
	            data: ganttData,
	            slideWidth: 900,
	            behavior: {
	                onClick: function (data) {
	                    var msg = "You clicked on an event: { start: " + data.start.toString("M/d/yyyy") + ", end: " + data.end.toString("M/d/yyyy") + " }";
	                    $("#eventMessage").text(msg);
	                }
//                    ,
//	                onResize: function (data) {
//	                    var msg = "You resized an event: { start: " + data.start.toString("M/d/yyyy") + ", end: " + data.end.toString("M/d/yyyy") + " }";
//	                    $("#eventMessage").text(msg);
//	                },
//	                onDrag: function (data) {
//	                    var msg = "You dragged an event: { start: " + data.start.toString("M/d/yyyy") + ", end: " + data.end.toString("M/d/yyyy") + " }";
//	                    $("#eventMessage").text(msg);
//	                }
	            }
	        });

	        // $("#ganttChart").ganttView("setSlideWidth", 600);
	    });
	</script>
                  </td>
                </tr>
              </table>
            </asp:View>
               <asp:View ID="View3" runat="server">
    <br />
    <br />
    <br />

   <label>
   <br />
   <table>
   <tr>
    <td>
            <asp:HiddenField ID="idAutoEvaluacion" runat="server" Value="0"/>
           <span>Nro Autoevaluación:</span>
        <asp:TextBox ID="tbNroAutoevaluacion" runat="server" placeholder="Resolución de aprobación" 
         TextMode="Number"></asp:TextBox>
        <br />
      <span>Fecha desde :</span>
            <asp:TextBox ID="tbFechaDesde" runat="server" 
        placeholder="Fecha Resolución"  type="date"></asp:TextBox>
          <br />
        &nbsp;<span>Fecha hasta :</span>
            <asp:TextBox ID="tbFechaHasta" runat="server" 
        placeholder="Fecha vencimiento"  type="date"></asp:TextBox>
        


        &nbsp;&nbsp;&nbsp;
                             <div class="label">
     

                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
     

           <br />
     

         <asp:Button ID="btAutoevaluacion" runat="server" Text="Guardar" 
    class="button" onclick="btAutoevaluacion_Click" />
  
                    &nbsp;<asp:Button ID="btAutoevaluacion0" runat="server" class="button" 
                       OnClientClick="if (validarCierreAutoevaluacion() == false) return(false);"  onclick="btCerrarAutevaluacion" UseSubmitBehavior="false"   Text="Cerrar" />
  
     </div>
                   </td>
   </tr>  

   </table>
    </label>

            </asp:View>

          </asp:MultiView>
        </td>
      </tr>
    </table>
    </div>
    </form>
</body>
</html>
